from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import ArticleViewSet, ColumnViewSet, TopicViewSet


router = DefaultRouter()
router.register(r'articles', ArticleViewSet)
router.register(r'columns', ColumnViewSet)
router.register(r'topics', TopicViewSet, basename='topic') # 注册专题路由


urlpatterns = [
    path('', include(router.urls)),
]